package vip.xiaonuo.redis;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import vip.xiaonuo.core.cache.base.AbstractRedisCacheOperator;

@Service
public class RedisService extends AbstractRedisCacheOperator<String> {

    public static final String LOGIN_USER_CACHE_PREFIX = "Login_USER:";
    /**
     * 短信超时时间
     */
    public static final Long TIMEOUT_SECONDS = 10 * 60L ;

    public RedisService(RedisTemplate<String, String> redisTemplate) {
        super(redisTemplate);
    }

    @Override
    public String getCommonKeyPrefix() {
        return LOGIN_USER_CACHE_PREFIX;
    }

    public Long getTimeoutSeconds(){
        return TIMEOUT_SECONDS;
    }
}
